Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods


ODWindow

Superclasses
ODRefCntObject --> ODObject
Subclasses
none

An object of the ODWindow class is a wrapper for a platform-specific window structure.

Description

Every window (except a modal dialog box) must be associated with an OpenDoc window object so that the part belonging to the root frame of the window, and its embedded parts, can receive events from the dispatcher. To make platform-specific calls, part editors can retrieve the platform-specific window from the window object. However, in most cases, the interface to the ODWindow class provides the capability you need for interacting with your platform-specific windows.

Your part creates a window object by calling the window-state object's RegisterWindow method (page 864) or RegisterWindowForFrame method (page 867).

When your part creates a window, it specifies whether the new window should be a root window. A document remains open as long as it has an open root window; the document shell closes the document when the last root window is closed. A root window is also called a document window. The initial window of a document is a root window; its root part is the root part of the document. Part windows, which display embedded parts, and dialog boxes are not root windows. OpenDoc permits a single document to have multiple root windows as long as the root part provides a user interface to support them.

Your part should not maintain references to window objects for accessing OpenDoc windows because the document shell or the window-state object can close the window object and invalidate the reference. You should instead maintain window IDs, from which the window objects can be reconstructed.

Methods

This section presents summary descriptions of the ODWindow methods grouped according to purpose, followed by detailed descriptions in alphabetical order. Methods marked [D] are called only by the document shell or container applications. Methods marked [M] are specific to the Mac OS platform.

Window Manipulation

Close [D]
Closes this window object.
CloseAndRemove
Closes this window object and removes the root frame from its draft.
Hide
Makes this window invisible.
Show
Makes this window visible.
Select [M]
Makes this window object the frontmost window and activates it.
GetID
Returns the window ID for this window object.
GetPlatformWindow
Returns the platform-specific window for this window object.
Update [M]
Forces immediate updating of this window, rather than waiting for an update event.
Window Characteristics

IsActive
Returns a Boolean value that indicates whether this window is active.
IsFloating
Returns a Boolean value that indicates whether this window is a floating window.
IsResizable
Returns a Boolean value that indicates whether this window is resizable.
IsRootWindow
Returns a Boolean value that indicates whether this window object is a root window.
IsShown
Returns a Boolean value that indicates whether this window is currently visible.
ShouldDispose [M]
Returns a Boolean value that indicates whether the platform window should be disposed of when this window object is deleted.
ShouldSave
Returns a Boolean value that indicates whether this window object should be saved in its draft.
SetShouldSave
Specifies whether this window object should be saved in its draft.
ShouldShowLinks
Returns a Boolean value that indicates whether links should be highlighted in this window.
SetShouldShowLinks
Specifies whether links should be highlighted in this window.
Facet Manipulation

GetFacetUnderPoint
Returns a reference to the facet of this window under the specified point.
GetRootFacet
Returns a reference to the root facet of this window object.
Open
Creates a facet hierarchy in this window object.
Frame Manipulation

GetRootFrame
Returns a reference to the root frame of this window object.
AcquireSourceFrame
Returns a reference to the frame, if any, from which this window was opened.
SetSourceFrame
Sets the source frame of this window object.
AdjustWindowShape
Reshapes the root frame to match the size of this window.

Methods
AcquireSourceFrame
AdjustWindowShape
Close
CloseAndRemove
GetFacetUnderPoint
GetID
GetPlatformWindow
GetRootFacet
GetRootFrame
Hide
IsActive
IsFloating
IsResizable
IsRootWindow
IsShown
Open
Select
SetShouldSave
SetShouldShowLinks
SetSourceFrame
ShouldDispose
ShouldSave
ShouldShowLinks
Show
Update

Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help